

def meansuer():
    temp = 39
    wetness = 23.22
    print("湿度是 %0.2f,温度是 %0.1f" %(temp,wetness));

    #return (23.23,2.8);
    return temp,wetness;

result = meansuer();
print(result);
print(result[0]);
print(result[1]);

global_temp,global_wetness = meansuer();
#打印多个变量
print(global_temp,global_wetness);


#交换两个变量
# global_lishi = global_wetness;
# global_wetness = global_temp;
# global_temp = global_lishi;

# print("交换后的值是 %0.2f %0.2f" %(global_temp,global_wetness));


print("交换两个值的方法二");

# global_temp = global_temp + global_wetness;
# global_wetness = global_temp - global_wetness;
# global_temp = global_temp - global_wetness;
#
# print("交换后的值是 %0.2f %0.2f" %(global_temp,global_wetness));

print("交换两个值python专有的方法三");

global_temp,global_wetness = global_wetness,global_temp;
print("交换后的值是 %0.2f %0.2f" %(global_temp,global_wetness));